package com.example.demo.config;

import com.example.demo.heartbeat.HeartBeatClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 应用启动是配置
 *
 * @author wenxiong.xia
 * @Created 2020-07-20 15:23:41
 */
@Slf4j
@Component
public class ApplicationRunnerConfig implements CommandLineRunner {


    @Autowired
    private HeartBeatClient heartBeatClient;

    @Override
    public void run(String... args) {
        heartBeatClient.run();
    }
}